home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- // BackGrnd.h
- //---------------------------------------------------------------------------
-
- //---------------------------------------------------------------------------
- // Resource Information
- //---------------------------------------------------------------------------
- // Toolbox bitmap resource IDs numbers.
- //---------------------------------------------------------------------------
- #define IDBMP_BackGrnd 8000
- #define IDBMP_BackGrndDOWN 8001
- #define IDBMP_BackGrndMONO 8003
- #define IDBMP_BackGrndEGA 8006
-
- //---------------------------------------------------------------------------
- // Update these fields for each build.
- //---------------------------------------------------------------------------
- #define VBX_VERSION 3,00,0,00
- #define VBX_VERSION_STR "3.00.000"
-
- #ifndef RC_INVOKED
- //---------------------------------------------------------------------------
- // Macro for referencing member of structure
- //---------------------------------------------------------------------------
- #define OFFSETIN(struc,field) ((USHORT)&(((struc *)0)->field))
-
-
- //---------------------------------------------------------------------------
- // Control Procedure
- //---------------------------------------------------------------------------
- LONG FAR PASCAL _export BackGrndCtlProc(HCTL, HWND, USHORT, USHORT, LONG);
-
- //---------------------------------------------------------------------------
- // BackGrnd control data and structs
- //---------------------------------------------------------------------------
- typedef struct tagBackGrnd
- {
- ENUM About;
- HPIC Picture;
- } BackGrnd;
-
- typedef BackGrnd FAR * LPBackGrnd;
-
- #define LpBackGrndDEREF(hctl) ((LPBackGrnd)VBDerefControl(hctl))
-
-
- //---------------------------------------------------------------------------
- // Property info
- //---------------------------------------------------------------------------
-
- PROPINFO Property_About =
- {
- "About",
- DT_ENUM | PF_fGetData | PF_fSetMsg | PF_fSetMsg,
- OFFSETIN(BackGrnd, About), 0,
- 0,
- "Click on ""..."" for About Box\0",
- 0
- };
-
- PROPINFO Property_Picture =
- {
- "Picture",
- DT_PICTURE | PF_fGetData | PF_fSaveData | PF_fSetData | PF_fSetMsg,
- OFFSETIN(BackGrnd, Picture),
- 0, 0, NULL, 0
- };
-
-
- //---------------------------------------------------------------------------
- // Property list
- //---------------------------------------------------------------------------
- // Define the consecutive indicies for the properties
- //---------------------------------------------------------------------------
- #define IPROP_BackGrnd_CTLNAME 0
- #define IPROP_BackGrnd_HWND 1
- #define IPROP_BackGrnd_INDEX 2
- #define IPROP_BackGrnd_About 3
- #define IPROP_BackGrnd_ENABLED 4
- #define IPROP_BackGrnd_HEIGHT 5
- #define IPROP_BackGrnd_LEFT 6
- #define IPROP_BackGrnd_TOP 7
- #define IPROP_BackGrnd_VISIBLE 8
- #define IPROP_BackGrnd_WIDTH 9
- #define IPROP_BackGrnd_Picture 10
-
- PPROPINFO BackGrnd_Properties[] =
- {
- PPROPINFO_STD_CTLNAME,
- PPROPINFO_STD_HWND,
- PPROPINFO_STD_INDEX,
- &Property_About,
- PPROPINFO_STD_ENABLED,
- PPROPINFO_STD_HEIGHT,
- PPROPINFO_STD_LEFT,
- PPROPINFO_STD_TOP,
- PPROPINFO_STD_VISIBLE,
- PPROPINFO_STD_WIDTH,
- &Property_Picture,
- NULL
- };
-
-
- //---------------------------------------------------------------------------
- // Event info
- //---------------------------------------------------------------------------
- EVENTINFO Event_BeginPaint =
- {
- "BeginPaint",
- 0,
- 0,
- NULL,
- NULL
- };
-
- EVENTINFO Event_EndPaint =
- {
- "EndPaint",
- 0,
- 0,
- NULL,
- NULL
- };
-
-
- //---------------------------------------------------------------------------
- // Event list
- //---------------------------------------------------------------------------
- // Define the consecutive indicies for the events
- //---------------------------------------------------------------------------
- #define IEVENT_BackGrnd_BeginPaint 0
- #define IEVENT_BackGrnd_CLICK 1
- #define IEVENT_BackGrnd_DBLCLICK 2
- #define IEVENT_BackGrnd_EndPaint 3
- #define IEVENT_BackGrnd_MOUSEDOWN 4
- #define IEVENT_BackGrnd_MOUSEMOVE 5
- #define IEVENT_BackGrnd_MOUSEUP 6
-
- PEVENTINFO
- BackGrnd_Events[] =
- {
- &Event_BeginPaint,
- PEVENTINFO_STD_CLICK,
- PEVENTINFO_STD_DBLCLICK,
- &Event_EndPaint,
- PEVENTINFO_STD_MOUSEDOWN,
- PEVENTINFO_STD_MOUSEMOVE,
- PEVENTINFO_STD_MOUSEUP,
- NULL
- };
-
-
- //---------------------------------------------------------------------------
- // Model struct
- //---------------------------------------------------------------------------
- // Define the control model (using the event and property structures).
- //---------------------------------------------------------------------------
- MODEL modelBackGrnd =
- {
- VB_VERSION, // VB version being used
- 0, // MODEL flags
- (PCTLPROC)BackGrndCtlProc, // Control procedure
- 0 | CS_HREDRAW | CS_VREDRAW, // Class style
- 0L, // Default Windows style
- sizeof(BackGrnd), // Size of CIRC structure
- IDBMP_BackGrnd, // Palette bitmap ID
- "BackGrnd", // Default control name
- "BackGrnd", // Visual Basic class name
- NULL, // Parent class name
- BackGrnd_Properties, // Property information table
- BackGrnd_Events, // Event information table
- 0, // Default property
- 0, // Default event
- };
- #endif // RC_INVOKED
- //---------------------------------------------------------------------------
-